﻿<UserControl x:Class="ScrumFactory.Risks.RiskDetail"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             
             xmlns:SF="clr-namespace:ScrumFactory;assembly=ScrumFactory"
             xmlns:SF_Helpers="clr-namespace:ScrumFactory.Windows.Helpers;assembly=ScrumFactory.Windows.Helpers"
             xmlns:SF_Adorners="clr-namespace:ScrumFactory.Windows.Helpers.Adorners;assembly=ScrumFactory.Windows.Helpers"             
             xmlns:SF_Comp="clr-namespace:ScrumFactory.Composition;assembly=ScrumFactory.Composition" 
             xmlns:SF_Ext="clr-namespace:ScrumFactory.Windows.Helpers.Extensions;assembly=ScrumFactory.Windows.Helpers"
              xmlns:KExt="clr-namespace:System.Windows.KExtensions;assembly=System.Windows.KExtensions"
             
             xmlns:props="clr-namespace:ScrumFactory.Risks.Properties"
             
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <TabControl Style="{StaticResource WindowTabControl}">
        <TabControl.Items>
            <TabItem Header="{Binding PanelName}">
                <SF_Helpers:PanelLayout Title="{Binding PanelName}" Style="{StaticResource DetailPanelLayout}">
                    <SF_Helpers:PanelLayout.Toolbar>
                        <ToolBar>
                            <MenuItem Style="{StaticResource GoBackMenuItem}"/>
                            <MenuItem                                
                                Header="{x:Static props:Resources.Private_risk}"
                                IsCheckable="True"
                                IsChecked="{Binding Risk.IsPrivate}">
                                <MenuItem.Icon>
                                    <Image Source="/Images/Toolbar/Closed_locker.png" Width="32" Height="32" Stretch="Uniform"/>
                                </MenuItem.Icon>
                            </MenuItem>
                        </ToolBar>
                    </SF_Helpers:PanelLayout.Toolbar>
                    
                    <SF_Helpers:PanelLayout.Content>
                        
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="160"/>
                                <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="auto"/>
                                <RowDefinition Height="*"/>
                            </Grid.RowDefinitions>
                            
                            <TextBlock Grid.Column="0" Grid.Row="0"
                                       Text="{x:Static props:Resources.Risk}"
                                       VerticalAlignment="Top" Style="{StaticResource LabelTextBlock}"/>
                            <TextBox 
                                KExt:SpellCheck.IsEnabled="True"
                                Grid.Column="1" Grid.Row="0" HorizontalAlignment="Stretch" MinHeight="100" 
                                     Text="{Binding Risk.RiskDescription, UpdateSourceTrigger=PropertyChanged}"
                                     MaxLength="300"/>

                            <TextBlock Grid.Column="0" Grid.Row="1"
                                       Text="{x:Static props:Resources.Actions}"
                                       VerticalAlignment="Top"  Style="{StaticResource LabelTextBlock}"/>
                            <TextBox 
                                KExt:SpellCheck.IsEnabled="True" AcceptsReturn="True"
                                Grid.Column="1" Grid.Row="1"  HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                                     TextWrapping="Wrap"
                                     Text="{Binding Risk.RiskAction, UpdateSourceTrigger=PropertyChanged}"
                                     MaxLength="500" />


                        </Grid>
                        
                    </SF_Helpers:PanelLayout.Content>
                    
                </SF_Helpers:PanelLayout>
            </TabItem>
        </TabControl.Items>
    </TabControl>

</UserControl>
